﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="new.aspx.cs" Inherits="AnyOffice.general.system.netdisk._new" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>新建共享目录</title>
		<script language="javascript" src="/aspnet_client/core/function.js"></script>
		<script Language="JavaScript">
		    function CheckForm() {
		        if (document.Form1.txtName.value == "") {
		            alert("目录名称不能为空！");
		            return (false);
		        }

		        /*
		        if(document.Form1.txtDiskPath.value=="")
		        { alert("目录路径不能为空！");
		        return (false);
		        }
		        */

		        if (document.Form1.ddlType.value == "2" && document.Form1.PostDeptId.value == "") {
		            alert("请指定部门！");
		            return (false);
		        }

		        if (document.Form1.ddlType.value == "3" && document.Form1.AccessUserId.value == "") {
		            alert("请指定人员！");
		            return (false);
		        }

		        return (true);
		    }
		</script>
		<script Language="JavaScript">
		    function select_type() {
		        if (Form1.ddlType.value == "1") {
		            trDept.style.display = 'none';
		            trUser.style.display = 'none';
		        }
		        else if (Form1.ddlType.value == "2") {
		            trDept.style.display = '';
		            trUser.style.display = 'none';
		        }
		        else if (Form1.ddlType.value == "3") {
		            trDept.style.display = 'none';
		            trUser.style.display = '';
		        }
		    }
		</script>
	</HEAD>
	<body class="bodycolor" topMargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/menu/netdisk.gif" align="absMiddle"><span class="big3">
							新建共享目录</span>
					</td>
				</tr>
			</table>
			<br>
			<asp:Panel id="pnlMain" runat="server">
			<table border="0" width="650" cellpadding="2" cellspacing="1" align="center" class="small" bgcolor="#000000">
				<tr>
					<td nowrap class="TableData">
						目录名称：</td>
					<td class="TableData">
						<input type="text" name="txtName" size="40" class="BigInput" id="txtName" runat="server">
					</td>
				</tr>
				<tr>
					<td nowrap class="TableData">
						目录路径(OA服务器的磁盘<br />目录路径，如 d:\soft)：</td>
					<td class="TableData">
						<input type="text" name="txtDiskPath" size="40" class="BigInput" id="txtDiskPath" runat="server"><br>
						如果不填写，则自动新建目录路径
					</td>
				</tr>
				<TR>
					<TD class="TableData" colspan="2" noWrap><font color=red>系统提示：请确认Windows系统帐户Users组和ASPNET帐户对指定的磁盘目录具有访问控制权限。</font></TD>
				</TR>
				<tr>
					<td nowrap class="TableData">
						开放范围：</td>
					<td class="TableData">
						<SELECT class="BigSelect" id="ddlType" onchange="select_type()" name="ddlType" runat="server">
							<option value="1" selected>全体</option>
							<option value="2">指定部门</option>
							<option value="3">指定人员</option>
						</SELECT>
					</td>
				</tr>
				<tr id="trDept" style="DISPLAY: none">
					<td nowrap class="TableData">
						选择部门（对指定部门开放）：</td>
					<td class="TableData">
						<INPUT id="PostDeptId" type="hidden" name="PostDeptId" runat="server"> <TEXTAREA class="BigStatic" id="PostDeptName" name="PostDeptName" rows="2" readOnly cols="30"
							runat="server"></TEXTAREA>&nbsp;<INPUT class="SmallButton" title="添加部门" onclick="dept_select('PostDeptId','PostDeptName','true');" type="button" value="添 加"
							name="button"> &nbsp;<INPUT class="SmallButton" title="清空部门" onclick="clear_double('PostDeptId','PostDeptName');" type="button" value="清 空"
							name="button">
					</td>
				</tr>
				<TR id="trUser" style="DISPLAY: none">
					<TD class="TableData" noWrap>选择人员（对指定人员开放）：</TD>
					<TD class="TableData"><INPUT id="AccessUserId" type="hidden" name="AccessUserId" runat="server">
						<TEXTAREA class="BigStatic" id="AccessUserName" name="AccessUserName" rows="2" readOnly cols="50"
							runat="server"></TEXTAREA>&nbsp;<INPUT class="SmallButton" title="添加人员" onclick="user_select('AccessUserId','AccessUserName');" type="button" value="添 加"
							name="button"> &nbsp;<INPUT class="SmallButton" title="清空人员" onclick="clear_double('AccessUserId','AccessUserName');" type="button" value="清 空"
							name="button"></TD>
				</TR>
				<TR>
						<TD class="TableData" noWrap>
                            默认权限：</TD>
						<TD class="TableData">
                            <asp:CheckBoxList ID="ckblDefaultPriv" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Value="FileRead" Selected="True">阅读</asp:ListItem>                                                               
                                <asp:ListItem Value="FilePrint" Selected="True">打印</asp:ListItem>
                                <asp:ListItem Value="FileCopy" Selected="True">复制</asp:ListItem>
                                <asp:ListItem Value="FileDownload" Selected="True">下载</asp:ListItem>
                            </asp:CheckBoxList></TD>
					</TR>
					
					<TR>
						<TD class="TableData" noWrap>
                            新建权限：</TD>
						<TD class="TableData"><INPUT id="NewUserId" type="hidden" name="NewUserId" runat="server">
							<TEXTAREA class="BigStatic" id="NewUserName" name="NewUserName" rows="2" readOnly cols="50"
								runat="server"></TEXTAREA>&nbsp;<INPUT class="SmallButton" title="添加人员" onclick="user_select('NewUserId','NewUserName');" type="button" value="添 加"
								name="button"> &nbsp;<INPUT class="SmallButton" title="清空人员" onclick="clear_double('NewUserId','NewUserName');" type="button" value="清 空"
								name="button">
								<br />
                            有权限的人可以上传文件和新建文件夹
								</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>
                            阅读/打印权限：</TD>
						<TD class="TableData"><INPUT id="ReadUserId" type="hidden" name="ReadUserId" runat="server">
							<TEXTAREA class="BigStatic" id="ReadUserName" name="ReadUserName" rows="2" readOnly cols="50"
								runat="server"></TEXTAREA>&nbsp;<INPUT class="SmallButton" title="添加人员" onclick="user_select('ReadUserId','ReadUserName');" type="button" value="添 加"
								name="button"> &nbsp;<INPUT class="SmallButton" title="清空人员" onclick="clear_double('ReadUserId','ReadUserName');" type="button" value="清 空"
								name="button"><br />
                            <asp:CheckBoxList ID="ckblReadPriv" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Value="FilePrint">打印</asp:ListItem>
                                <asp:ListItem Value="FileCopy">复制</asp:ListItem>
                            </asp:CheckBoxList>
                            有权限的人可以在线阅读或打印Office文档
                            </TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>
                            编辑权限：</TD>
						<TD class="TableData"><INPUT id="EditUserId" type="hidden" name="EditUserId" runat="server">
							<TEXTAREA class="BigStatic" id="EditUserName" name="EditUserName" rows="2" readOnly cols="50"
								runat="server"></TEXTAREA>&nbsp;<INPUT class="SmallButton" title="添加人员" onclick="user_select('EditUserId','EditUserName');" type="button" value="添 加"
								name="button"> &nbsp;<INPUT class="SmallButton" title="清空人员" onclick="clear_double('EditUserId','EditUserName');" type="button" value="清 空"
								name="button">
                            <br />有权限的人可以在线编辑Office文档
								</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>
                            下载权限：</TD>
						<TD class="TableData"><INPUT id="DownloadUserId" type="hidden" name="DownloadUserId" runat="server">
							<TEXTAREA class="BigStatic" id="DownloadUserName" name="DownloadUserName" rows="2" readOnly cols="50"
								runat="server"></TEXTAREA>&nbsp;<INPUT class="SmallButton" title="添加人员" onclick="user_select('DownloadUserId','DownloadUserName');" type="button" value="添 加"
								name="button"> &nbsp;<INPUT class="SmallButton" title="清空人员" onclick="clear_double('DownloadUserId','DownloadUserName');" type="button" value="清 空"
								name="button">
								<br />有权限的人可以下载Office文档</TD>
					</TR>
					
					<TR>
						<TD class="TableData" noWrap>
                            管理权限：</TD>
						<TD class="TableData"><INPUT id="ManageUserId" type="hidden" name="ManageUserId" runat="server">
							<TEXTAREA class="BigStatic" id="ManageUserName" name="ManageUserName" rows="2" readOnly cols="50"
								runat="server"></TEXTAREA>&nbsp;<INPUT class="SmallButton" title="添加人员" onclick="user_select('ManageUserId','ManageUserName');" type="button" value="添 加"
								name="button"> &nbsp;<INPUT class="SmallButton" title="清空人员" onclick="clear_double('ManageUserId','ManageUserName');" type="button" value="清 空"
								name="button"></TD>
					</TR>
				<tr align="center" class="TableControl">
					<td colspan="2" nowrap>
						<input type="submit" value="确定" class="BigButton" onclick="return CheckForm();">&nbsp;&nbsp;<input type="button" value="返回" class="BigButton" onClick="location='index.aspx'">
					</td>
				</tr>
			</table>
			</asp:Panel>
			<asp:Literal id="litMessage" runat="server"></asp:Literal>
		</form>
	</body>
</HTML>
